package com.laowang.project.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyCyhShopCattleUserMapper;
import com.laowang.project.system.domain.MyCyhShopCattleUser;
import com.laowang.project.system.service.MyCyhShopCattleUserService;

/**
 * 商家用户Service业务层处理
 *
 * @author laowang
 * @date 2024-04-26
 */
@Service
public class MyCyhShopCattleUserServiceImpl implements MyCyhShopCattleUserService {
    @Autowired
    private MyCyhShopCattleUserMapper myCyhShopCattleUserMapper;

    /**
     * 查询商家用户
     *
     * @param id 商家用户ID
     * @return 商家用户
     */
    @Override
    public MyCyhShopCattleUser selectMyCyhShopCattleUserById(Integer id) {
        return myCyhShopCattleUserMapper.selectMyCyhShopCattleUserById(id);
    }

    /**
     * 查询商家用户列表
     *
     * @param myCyhShopCattleUser 商家用户
     * @return 商家用户
     */
    @Override
    public List<MyCyhShopCattleUser> selectMyCyhShopCattleUserList(MyCyhShopCattleUser myCyhShopCattleUser) {
        return myCyhShopCattleUserMapper.selectMyCyhShopCattleUserList(myCyhShopCattleUser);
    }

    /**
     * 新增商家用户
     *
     * @param myCyhShopCattleUser 商家用户
     * @return 结果
     */
    @Override
    public int insertMyCyhShopCattleUser(MyCyhShopCattleUser myCyhShopCattleUser) {
        return myCyhShopCattleUserMapper.insertMyCyhShopCattleUser(myCyhShopCattleUser);
    }

    /**
     * 修改商家用户
     *
     * @param myCyhShopCattleUser 商家用户
     * @return 结果
     */
    @Override
    public int updateMyCyhShopCattleUser(MyCyhShopCattleUser myCyhShopCattleUser) {
        return myCyhShopCattleUserMapper.updateMyCyhShopCattleUser(myCyhShopCattleUser);
    }

    /**
     * 批量删除商家用户
     *
     * @param ids 需要删除的商家用户ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhShopCattleUserByIds(Integer[] ids) {
        return myCyhShopCattleUserMapper.deleteMyCyhShopCattleUserByIds(ids);
    }

    /**
     * 删除商家用户信息
     *
     * @param id 商家用户ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhShopCattleUserById(Integer id) {
        return myCyhShopCattleUserMapper.deleteMyCyhShopCattleUserById(id);
    }

    @Override
    public MyCyhShopCattleUser selectByUserName(String username) {
        return myCyhShopCattleUserMapper.selectByUserName(username);
    }
}
